package abstractEntities;

import java.sql.Time;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.MappedSuperclass;
import javax.persistence.OneToMany;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import org.hibernate.annotations.GenericGenerator;

import entities.Boedep;
import entities.Complaint;
import entities.Departament;
import entities.Language;
import entities.Tutorial;
import entities.Tutorialranking;
import entities.User;
import entities.Usertutorial;

/**
 * AbstractTutorial entity provides the base persistence definition of the
 * Tutorial entity. @author MyEclipse Persistence Tools
 */
@MappedSuperclass
public abstract class AbstractTutorial implements java.io.Serializable {

	// Fields

	/**
	 * 
	 */
	private static final long serialVersionUID = -5776419592298711478L;
	private Integer idTutorial;
	private User userByIdValidator;
	private Departament departament;
	private User userByIdAuthor;
	private Tutorial tutorial;
	private Language language;
	private Date creationDate;
	private Integer level;
	private Time duration;
	private Integer validationFlag;
	private Integer totalPoints;
	private Date validationDate;
	private Integer magnitude;
	private String materialsInfo;
	private String name;
	private String contXml;
	private String introduction;
	private Integer views;
	private Set<Tutorialranking> tutorialrankingsForIdTutorial5 = new HashSet<Tutorialranking>(
			0);
	private Set<Tutorialranking> tutorialrankingsForIdTutorial4 = new HashSet<Tutorialranking>(
			0);
	private Set<Tutorialranking> tutorialrankingsForIdTutorial3 = new HashSet<Tutorialranking>(
			0);
	private Set<Tutorialranking> tutorialrankingsForIdTutorial2 = new HashSet<Tutorialranking>(
			0);
	private Set<Tutorial> tutorials = new HashSet<Tutorial>(0);
	private Set<Complaint> complaints = new HashSet<Complaint>(0);
	private Set<Tutorialranking> tutorialrankingsForIdTutorial1 = new HashSet<Tutorialranking>(
			0);
	private Set<Boedep> boedepsForIdTutorial1 = new HashSet<Boedep>(0);
	private Set<Usertutorial> usertutorials = new HashSet<Usertutorial>(0);
	private Set<Boedep> boedepsForIdTutorial3 = new HashSet<Boedep>(0);
	private Set<Boedep> boedepsForIdTutorial2 = new HashSet<Boedep>(0);
	private Set<Boedep> boedepsForIdTutorial5 = new HashSet<Boedep>(0);
	private Set<Boedep> boedepsForIdTutorial4 = new HashSet<Boedep>(0);

	// Constructors

	/** default constructor */
	public AbstractTutorial() {
	}

	/** minimal constructor */
	public AbstractTutorial(User userByIdValidator, Departament departament,
			User userByIdAuthor, Language language, Date creationDate,
			Integer level, Time duration, Integer validationFlag,
			Integer totalPoints, Integer magnitude, String materialsInfo,
			String name, String contXml, String introduction, Integer views) {
		this.userByIdValidator = userByIdValidator;
		this.departament = departament;
		this.userByIdAuthor = userByIdAuthor;
		this.language = language;
		this.creationDate = creationDate;
		this.level = level;
		this.duration = duration;
		this.validationFlag = validationFlag;
		this.totalPoints = totalPoints;
		this.magnitude = magnitude;
		this.materialsInfo = materialsInfo;
		this.name = name;
		this.contXml = contXml;
		this.introduction = introduction;
		this.views = views;
	}

	/** full constructor */
	public AbstractTutorial(User userByIdValidator, Departament departament,
			User userByIdAuthor, Tutorial tutorial, Language language,
			Date creationDate, Integer level, Time duration,
			Integer validationFlag, Integer totalPoints, Date validationDate,
			Integer magnitude, String materialsInfo, String name,
			String contXml, String introduction, Integer views,
			Set<Tutorialranking> tutorialrankingsForIdTutorial5,
			Set<Tutorialranking> tutorialrankingsForIdTutorial4,
			Set<Tutorialranking> tutorialrankingsForIdTutorial3,
			Set<Tutorialranking> tutorialrankingsForIdTutorial2,
			Set<Tutorial> tutorials, Set<Complaint> complaints,
			Set<Tutorialranking> tutorialrankingsForIdTutorial1,
			Set<Boedep> boedepsForIdTutorial1, Set<Usertutorial> usertutorials,
			Set<Boedep> boedepsForIdTutorial3,
			Set<Boedep> boedepsForIdTutorial2,
			Set<Boedep> boedepsForIdTutorial5, Set<Boedep> boedepsForIdTutorial4) {
		this.userByIdValidator = userByIdValidator;
		this.departament = departament;
		this.userByIdAuthor = userByIdAuthor;
		this.tutorial = tutorial;
		this.language = language;
		this.creationDate = creationDate;
		this.level = level;
		this.duration = duration;
		this.validationFlag = validationFlag;
		this.totalPoints = totalPoints;
		this.validationDate = validationDate;
		this.magnitude = magnitude;
		this.materialsInfo = materialsInfo;
		this.name = name;
		this.contXml = contXml;
		this.introduction = introduction;
		this.views = views;
		this.tutorialrankingsForIdTutorial5 = tutorialrankingsForIdTutorial5;
		this.tutorialrankingsForIdTutorial4 = tutorialrankingsForIdTutorial4;
		this.tutorialrankingsForIdTutorial3 = tutorialrankingsForIdTutorial3;
		this.tutorialrankingsForIdTutorial2 = tutorialrankingsForIdTutorial2;
		this.tutorials = tutorials;
		this.complaints = complaints;
		this.tutorialrankingsForIdTutorial1 = tutorialrankingsForIdTutorial1;
		this.boedepsForIdTutorial1 = boedepsForIdTutorial1;
		this.usertutorials = usertutorials;
		this.boedepsForIdTutorial3 = boedepsForIdTutorial3;
		this.boedepsForIdTutorial2 = boedepsForIdTutorial2;
		this.boedepsForIdTutorial5 = boedepsForIdTutorial5;
		this.boedepsForIdTutorial4 = boedepsForIdTutorial4;
	}

	// Property accessors
	@GenericGenerator(name = "generator", strategy = "increment")
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "idTutorial", unique = true, nullable = false)
	public Integer getIdTutorial() {
		return this.idTutorial;
	}

	public void setIdTutorial(Integer idTutorial) {
		this.idTutorial = idTutorial;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "idValidator", nullable = false)
	public User getUserByIdValidator() {
		return this.userByIdValidator;
	}

	public void setUserByIdValidator(User userByIdValidator) {
		this.userByIdValidator = userByIdValidator;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "idDepartament", nullable = false)
	public Departament getDepartament() {
		return this.departament;
	}

	public void setDepartament(Departament departament) {
		this.departament = departament;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "idAuthor", nullable = false)
	public User getUserByIdAuthor() {
		return this.userByIdAuthor;
	}

	public void setUserByIdAuthor(User userByIdAuthor) {
		this.userByIdAuthor = userByIdAuthor;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "idOriginal")
	public Tutorial getTutorial() {
		return this.tutorial;
	}

	public void setTutorial(Tutorial tutorial) {
		this.tutorial = tutorial;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "abb", nullable = false)
	public Language getLanguage() {
		return this.language;
	}

	public void setLanguage(Language language) {
		this.language = language;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "creationDate", nullable = false, length = 10)
	public Date getCreationDate() {
		return this.creationDate;
	}

	public void setCreationDate(Date creationDate) {
		this.creationDate = creationDate;
	}

	@Column(name = "level", nullable = false)
	public Integer getLevel() {
		return this.level;
	}

	public void setLevel(Integer level) {
		this.level = level;
	}

	@Column(name = "duration", nullable = false, length = 8)
	public Time getDuration() {
		return this.duration;
	}

	public void setDuration(Time duration) {
		this.duration = duration;
	}

	@Column(name = "validationFlag", nullable = false)
	public Integer getValidationFlag() {
		return this.validationFlag;
	}

	public void setValidationFlag(Integer validationFlag) {
		this.validationFlag = validationFlag;
	}

	@Column(name = "totalPoints", nullable = false)
	public Integer getTotalPoints() {
		return this.totalPoints;
	}

	public void setTotalPoints(Integer totalPoints) {
		this.totalPoints = totalPoints;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "validationDate", length = 10)
	public Date getValidationDate() {
		return this.validationDate;
	}

	public void setValidationDate(Date validationDate) {
		this.validationDate = validationDate;
	}

	@Column(name = "magnitude", nullable = false)
	public Integer getMagnitude() {
		return this.magnitude;
	}

	public void setMagnitude(Integer magnitude) {
		this.magnitude = magnitude;
	}

	@Column(name = "materialsInfo", nullable = false)
	public String getMaterialsInfo() {
		return this.materialsInfo;
	}

	public void setMaterialsInfo(String materialsInfo) {
		this.materialsInfo = materialsInfo;
	}

	@Column(name = "name", nullable = false)
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "contXML", nullable = false, length = 1000)
	public String getContXml() {
		return this.contXml;
	}

	public void setContXml(String contXml) {
		this.contXml = contXml;
	}

	@Column(name = "introduction", nullable = false, length = 1000)
	public String getIntroduction() {
		return this.introduction;
	}

	public void setIntroduction(String introduction) {
		this.introduction = introduction;
	}

	@Column(name = "views", nullable = false)
	public Integer getViews() {
		return this.views;
	}

	public void setViews(Integer views) {
		this.views = views;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tutorialByIdTutorial5")
	public Set<Tutorialranking> getTutorialrankingsForIdTutorial5() {
		return this.tutorialrankingsForIdTutorial5;
	}

	public void setTutorialrankingsForIdTutorial5(
			Set<Tutorialranking> tutorialrankingsForIdTutorial5) {
		this.tutorialrankingsForIdTutorial5 = tutorialrankingsForIdTutorial5;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tutorialByIdTutorial4")
	public Set<Tutorialranking> getTutorialrankingsForIdTutorial4() {
		return this.tutorialrankingsForIdTutorial4;
	}

	public void setTutorialrankingsForIdTutorial4(
			Set<Tutorialranking> tutorialrankingsForIdTutorial4) {
		this.tutorialrankingsForIdTutorial4 = tutorialrankingsForIdTutorial4;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tutorialByIdTutorial3")
	public Set<Tutorialranking> getTutorialrankingsForIdTutorial3() {
		return this.tutorialrankingsForIdTutorial3;
	}

	public void setTutorialrankingsForIdTutorial3(
			Set<Tutorialranking> tutorialrankingsForIdTutorial3) {
		this.tutorialrankingsForIdTutorial3 = tutorialrankingsForIdTutorial3;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tutorialByIdTutorial2")
	public Set<Tutorialranking> getTutorialrankingsForIdTutorial2() {
		return this.tutorialrankingsForIdTutorial2;
	}

	public void setTutorialrankingsForIdTutorial2(
			Set<Tutorialranking> tutorialrankingsForIdTutorial2) {
		this.tutorialrankingsForIdTutorial2 = tutorialrankingsForIdTutorial2;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tutorial")
	public Set<Tutorial> getTutorials() {
		return this.tutorials;
	}

	public void setTutorials(Set<Tutorial> tutorials) {
		this.tutorials = tutorials;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tutorial")
	public Set<Complaint> getComplaints() {
		return this.complaints;
	}

	public void setComplaints(Set<Complaint> complaints) {
		this.complaints = complaints;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tutorialByIdTutorial1")
	public Set<Tutorialranking> getTutorialrankingsForIdTutorial1() {
		return this.tutorialrankingsForIdTutorial1;
	}

	public void setTutorialrankingsForIdTutorial1(
			Set<Tutorialranking> tutorialrankingsForIdTutorial1) {
		this.tutorialrankingsForIdTutorial1 = tutorialrankingsForIdTutorial1;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tutorialByIdTutorial1")
	public Set<Boedep> getBoedepsForIdTutorial1() {
		return this.boedepsForIdTutorial1;
	}

	public void setBoedepsForIdTutorial1(Set<Boedep> boedepsForIdTutorial1) {
		this.boedepsForIdTutorial1 = boedepsForIdTutorial1;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tutorial")
	public Set<Usertutorial> getUsertutorials() {
		return this.usertutorials;
	}

	public void setUsertutorials(Set<Usertutorial> usertutorials) {
		this.usertutorials = usertutorials;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tutorialByIdTutorial3")
	public Set<Boedep> getBoedepsForIdTutorial3() {
		return this.boedepsForIdTutorial3;
	}

	public void setBoedepsForIdTutorial3(Set<Boedep> boedepsForIdTutorial3) {
		this.boedepsForIdTutorial3 = boedepsForIdTutorial3;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tutorialByIdTutorial2")
	public Set<Boedep> getBoedepsForIdTutorial2() {
		return this.boedepsForIdTutorial2;
	}

	public void setBoedepsForIdTutorial2(Set<Boedep> boedepsForIdTutorial2) {
		this.boedepsForIdTutorial2 = boedepsForIdTutorial2;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tutorialByIdTutorial5")
	public Set<Boedep> getBoedepsForIdTutorial5() {
		return this.boedepsForIdTutorial5;
	}

	public void setBoedepsForIdTutorial5(Set<Boedep> boedepsForIdTutorial5) {
		this.boedepsForIdTutorial5 = boedepsForIdTutorial5;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tutorialByIdTutorial4")
	public Set<Boedep> getBoedepsForIdTutorial4() {
		return this.boedepsForIdTutorial4;
	}

	public void setBoedepsForIdTutorial4(Set<Boedep> boedepsForIdTutorial4) {
		this.boedepsForIdTutorial4 = boedepsForIdTutorial4;
	}

}